package com.netcracker.training.automonic.dao.entities;

import java.util.List;

/**
 * Attribute types describe substances of attributes.
 *
 * @author Vadim Gidulyan
 * 
 * @see Attribute
 */

public interface AttributeType
{

	/**
	 * Returns attribute type id.
	 * 
	 * @return attribute type id
	 */
	int getId();
	
	/**
	 * Returns code of attribute type.
	 * 
	 * @return code of attribute type
	 */
	String getCode();
	
	/**
	 * Sets the code of the attribute type. The code must be unique.
	 * 
	 * @param code new code of the attribute type 
	 */
	void setCode(String code);
	
	/**
	 * Returns name of attribute type. Name is used to display user interface.
	 * 
	 * @return name of attribute type
	 */
	String getName();
	
	/**
	 * Sets the name of the attribute type. Name is used to display user 
	 * interface.
	 * 
	 * @param name new name of the attribute type
	 */
	void setName(String name);
	
	/**
	 * Returns list of objects that have attributes of this type.
	 * 
	 * @return list of objects that have attributes of this type
	 */
	List<Object> getObjects();
	
	/**
	 * Returns list of attributes of this type.
	 * 
	 * @return list of attributes of this type
	 */
	List<Attribute> getAttributes();
	
	/**
	 * Saves object to database.
	 */
	void save();

}
